// 测试图片的预览功能，已弃用
// 官网： https://github.com/ascoders/react-native-image-viewer

import { StyleSheet, Modal } from 'react-native'
import ImageViewer from 'react-native-image-zoom-viewer';
import React, { useEffect, useState } from 'react'

const PreviewsImg = (props) => {
  console.log('props.images',props.images);
  const [images,setImages] = useState(props.images)
  const [visible,setVisible] = useState(true)

    const onRequestClose = () => {
      setVisible(!visible)
    }
  return (
    <Modal visible={visible} transparent={true} onRequestClose={onRequestClose}>
      <ImageViewer imageUrls={images} onCancel={() => { console.log('quxiao'); }} onChange={() => { }} />
    </Modal>
  )
}

export default PreviewsImg

const styles = StyleSheet.create({})